#ifndef PARSER_H
#define PARSER_H

#include <string>
#include <iostream>
#include <sstream>
class Parser
{
	public:
		Parser(std::istream &is);
		int GetElement();
		unsigned int LineNo() const;
		std::string Context() const;
	private:
		char NextChar();
		bool Readline();
		enum State{ignoreState,readState};
		State mState;
		std::istream &mtext;
		std::string mLine;
		unsigned int mLineNo,mPos;
};

#endif
